<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
	<meta charset="UTF-8">
	<title>jQuery JSON Test Suite</title>
	<!-- Libs -->
	<script src="../libs/jquery.js"></script>
	<script src="../libs/jquery.qunit.js"></script>
	<link rel="stylesheet" href="../libs/jquery.qunit.css">
	<!-- Testrun preparation -->
	<script>
	/**
	 * Implement 'min' option.
	 * Also makes sure we force a cache miss to ease develoment.
	 */
	QUnit.config.urlConfig.push({
		id: 'build_min',
		label: 'Use build',
		tooltip: 'Use the minified version from the build directory'
	});

	var srcPath,
		cacheBust = '?' + (+new Date());

	if (QUnit.urlParams.build_min) {
		srcPath = '../build/jquery.json.min.js';
	} else {
		srcPath = '../src/jquery.json.js';
	}

	/**
	 * Implement 'disable native' option.
	 * Useful for disabling the browsers native JSON api,
	 * and thus test the plugins methods instead.
	 */

	QUnit.config.urlConfig.push({
		id: 'disable_native',
		label: 'Disable native support',
		tooltip: 'Disable the native window.JSON object (if it exists)'
	});

	if (QUnit.urlParams.disable_native) {
		// Unset the native methods in order to test the fallback
		// of jquery.json (even in modern browsers).
		window.JSON = undefined;
	}

	// Load source
	document.write(
		'<script src="' + srcPath + cacheBust + '"><\/script>'
	);

	// Load test suite
	document.write(
		'<script src="jquery.json.test.js' + cacheBust + '"><\/script>'
	);
	</script>
</head>
<body>
	<div id="qunit"></div>
</body>
</html>
